home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / SCSL / clalsa.z / clalsa
Encoding:
Text File  |  2002-10-03  |  8.4 KB  |  265 lines

  1.  
  2.  
  3.  
  4. CCCCLLLLAAAALLLLSSSSAAAA((((3333SSSS))))                                                          CCCCLLLLAAAALLLLSSSSAAAA((((3333SSSS))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      CLALSA - i an itermediate step in solving the least squares problem by
  10.      computing the SVD of the coefficient matrix in compact form (The singular
  11.      vectors are computed as products of simple orthorgonal matrices.)
  12.  
  13. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  14.      SUBROUTINE CLALSA( ICOMPQ, SMLSIZ, N, NRHS, B, LDB, BX, LDBX, U, LDU, VT,
  15.                         K, DIFL, DIFR, Z, POLES, GIVPTR, GIVCOL, LDGCOL, PERM,
  16.                         GIVNUM, C, S, RWORK, IWORK, INFO )
  17.  
  18.          INTEGER        ICOMPQ, INFO, LDB, LDBX, LDGCOL, LDU, N, NRHS, SMLSIZ
  19.  
  20.          INTEGER        GIVCOL( LDGCOL, * ), GIVPTR( * ), IWORK( * ), K( * ),
  21.                         PERM( LDGCOL, * )
  22.  
  23.          REAL           C( * ), DIFL( LDU, * ), DIFR( LDU, * ), GIVNUM( LDU, *
  24.                         ), POLES( LDU, * ), RWORK( * ), S( * ), U( LDU, * ),
  25.                         VT( LDU, * ), Z( LDU, * )
  26.  
  27.          COMPLEX        B( LDB, * ), BX( LDBX, * )
  28.  
  29. IIIIMMMMPPPPLLLLEEEEMMMMEEEENNNNTTTTAAAATTTTIIIIOOOONNNN
  30.      These routines are part of the SCSL Scientific Library and can be loaded
  31.      using either the -lscs or the -lscs_mp option.  The -lscs_mp option
  32.      directs the linker to use the multi-processor version of the library.
  33.  
  34.      When linking to SCSL with -lscs or -lscs_mp, the default integer size is
  35.      4 bytes (32 bits). Another version of SCSL is available in which integers
  36.      are 8 bytes (64 bits).  This version allows the user access to larger
  37.      memory sizes and helps when porting legacy Cray codes.  It can be loaded
  38.      by using the -lscs_i8 option or the -lscs_i8_mp option. A program may use
  39.      only one of the two versions; 4-byte integer and 8-byte integer library
  40.      calls cannot be mixed.
  41.  
  42. PPPPUUUURRRRPPPPOOOOSSSSEEEE
  43.      CLALSA is an itermediate step in solving the least squares problem by
  44.      computing the SVD of the coefficient matrix in compact form (The singular
  45.      vectors are computed as products of simple orthorgonal matrices.). If
  46.      ICOMPQ = 0, CLALSA applies the inverse of the left singular vector matrix
  47.      of an upper bidiagonal matrix to the right hand side; and if ICOMPQ = 1,
  48.      CLALSA applies the right singular vector matrix to the right hand side.
  49.      The singular vector matrices were generated in compact form by CLALSA.
  50.  
  51.  
  52. AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  53.      ICOMPQ (input) INTEGER Specifies whether the left or the right singular
  54.      vector matrix is involved.  = 0: Left singular vector matrix
  55.      = 1: Right singular vector matrix
  56.  
  57.      SMLSIZ (input) INTEGER The maximum size of the subproblems at the bottom
  58.      of the computation tree.
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. CCCCLLLLAAAALLLLSSSSAAAA((((3333SSSS))))                                                          CCCCLLLLAAAALLLLSSSSAAAA((((3333SSSS))))
  71.  
  72.  
  73.  
  74.      N      (input) INTEGER
  75.             The row and column dimensions of the upper bidiagonal matrix.
  76.  
  77.      NRHS   (input) INTEGER
  78.             The number of columns of B and BX. NRHS must be at least 1.
  79.  
  80.      B      (input) COMPLEX array, dimension ( LDB, NRHS )
  81.             On input, B contains the right hand sides of the least squares
  82.             problem in rows 1 through M. On output, B contains the solution X
  83.             in rows 1 through N.
  84.  
  85.      LDB    (input) INTEGER
  86.             The leading dimension of B in the calling subprogram.  LDB must be
  87.             at least max(1,MAX( M, N ) ).
  88.  
  89.      BX     (output) COMPLEX array, dimension ( LDBX, NRHS )
  90.             On exit, the result of applying the left or right singular vector
  91.             matrix to B.
  92.  
  93.      LDBX   (input) INTEGER
  94.             The leading dimension of BX.
  95.  
  96.      U      (input) REAL array, dimension ( LDU, SMLSIZ ).
  97.             On entry, U contains the left singular vector matrices of all
  98.             subproblems at the bottom level.
  99.  
  100.      LDU    (input) INTEGER, LDU = > N.
  101.             The leading dimension of arrays U, VT, DIFL, DIFR, POLES, GIVNUM,
  102.             and Z.
  103.  
  104.      VT     (input) REAL array, dimension ( LDU, SMLSIZ+1 ).
  105.             On entry, VT' contains the right singular vector matrices of all
  106.             subproblems at the bottom level.
  107.  
  108.      K      (input) INTEGER array, dimension ( N ).
  109.  
  110.      DIFL   (input) REAL array, dimension ( LDU, NLVL ).
  111.             where NLVL = INT(log_2 (N/(SMLSIZ+1))) + 1.
  112.  
  113.      DIFR   (input) REAL array, dimension ( LDU, 2 * NLVL ).
  114.             On entry, DIFL(*, I) and DIFR(*, 2 * I -1) record distances
  115.             between singular values on the I-th level and singular values on
  116.             the (I -1)-th level, and DIFR(*, 2 * I) record the normalizing
  117.             factors of the right singular vectors matrices of subproblems on
  118.             I-th level.
  119.  
  120.      Z      (input) REAL array, dimension ( LDU, NLVL ).
  121.             On entry, Z(1, I) contains the components of the deflation-
  122.             adjusted updating row vector for subproblems on the I-th level.
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. CCCCLLLLAAAALLLLSSSSAAAA((((3333SSSS))))                                                          CCCCLLLLAAAALLLLSSSSAAAA((((3333SSSS))))
  137.  
  138.  
  139.  
  140.      POLES  (input) REAL array, dimension ( LDU, 2 * NLVL ).
  141.             On entry, POLES(*, 2 * I -1: 2 * I) contains the new and old
  142.             singular values involved in the secular equations on the I-th
  143.             level.
  144.  
  145.             GIVPTR (input) INTEGER array, dimension ( N ).  On entry, GIVPTR(
  146.             I ) records the number of Givens rotations performed on the I-th
  147.             problem on the computation tree.
  148.  
  149.             GIVCOL (input) INTEGER array, dimension ( LDGCOL, 2 * NLVL ).  On
  150.             entry, for each I, GIVCOL(*, 2 * I - 1: 2 * I) records the
  151.             locations of Givens rotations performed on the I-th level on the
  152.             computation tree.
  153.  
  154.             LDGCOL (input) INTEGER, LDGCOL = > N.  The leading dimension of
  155.             arrays GIVCOL and PERM.
  156.  
  157.      PERM   (input) INTEGER array, dimension ( LDGCOL, NLVL ).
  158.             On entry, PERM(*, I) records permutations done on the I-th level
  159.             of the computation tree.
  160.  
  161.             GIVNUM (input) REAL array, dimension ( LDU, 2 * NLVL ).  On entry,
  162.             GIVNUM(*, 2 *I -1 : 2 * I) records the C- and S- values of Givens
  163.             rotations performed on the I-th level on the computation tree.
  164.  
  165.      C      (input) REAL array, dimension ( N ).
  166.             On entry, if the I-th subproblem is not square, C( I ) contains
  167.             the C-value of a Givens rotation related to the right null space
  168.             of the I-th subproblem.
  169.  
  170.      S      (input) REAL array, dimension ( N ).
  171.             On entry, if the I-th subproblem is not square, S( I ) contains
  172.             the S-value of a Givens rotation related to the right null space
  173.             of the I-th subproblem.
  174.  
  175.      RWORK  (workspace) REAL array, dimension at least
  176.             max ( N, (SMLSZ+1)*NRHS*3 ).
  177.  
  178.      IWORK  (workspace) INTEGER array.
  179.             The dimension must be at least 3 * N
  180.  
  181.      INFO   (output) INTEGER
  182.             = 0:  successful exit.
  183.             < 0:  if INFO = -i, the i-th argument had an illegal value.
  184.  
  185. FFFFUUUURRRRTTTTHHHHEEEERRRR DDDDEEEETTTTAAAAIIIILLLLSSSS
  186.      Based on contributions by
  187.         Ming Gu and Ren-Cang Li, Computer Science Division, University of
  188.           California at Berkeley, USA
  189.         Osni Marques, LBNL/NERSC, USA
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. CCCCLLLLAAAALLLLSSSSAAAA((((3333SSSS))))                                                          CCCCLLLLAAAALLLLSSSSAAAA((((3333SSSS))))
  203.  
  204.  
  205.  
  206. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  207.      INTRO_LAPACK(3S), INTRO_SCSL(3S)
  208.  
  209.      This man page is available only online.
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.